<script>
import { deptList, roomList, operatingList } from "./data.js";
import SurgicalSchedule from "./components/SurgicalSchedule.vue";
// import SurgicalScheduleList from "./componentsList/SurgicalScheduleList.vue";
export default {
  data() {
    return {
      scheduleData: [
        // {
        //   name: "手术室",
        //   type: "opcategory",
        //   config: {
        //     idKey: "id",
        //     pIdKey: "pid",
        //     sortKey: "",
        //   },
        //   list: deptList || [
        //     {
        //       id: "1",
        //       pid: null,
        //       name: "住院部手术室",
        //     },
        //     {
        //       id: "2",
        //       pid: null,
        //       name: "手术室2",
        //     },
        //   ],
        // },
        {
          name: "手术间",
          type: "room",
          config: {
            idKey: "id",
            pIdKey: "pid",
            sortKey: "",
          },
          list: roomList || [
            {
              id: "1-1",
              pid: "1",
              name: "01间",
            },
            {
              id: "1-2",
              pid: "1",
              name: "02间",
            },
            {
              id: "1-3",
              pid: "1",
              name: "02间",
            },
            {
              id: "2-1",
              pid: "2",
              name: "01间",
            },
            {
              id: "2-2",
              pid: "2",
              name: "02间",
            },
            {
              id: "2-3",
              pid: "2",
              name: "02间",
            },
          ],
        },
        {
          name: "手术",
          type: "operating",
          config: {
            idKey: "id",
            pIdKey: "pid",
            sortKey: "",
          },
          list: operatingList || [
            {
              id: "1-1-1",
              pid: "1-1",
              name: "阿不都热依木（P1234567）",
            },
            {
              id: "1-1-2",
              pid: "1-1",
              name: "手术2",
            },
            {
              id: "1-1-3",
              pid: "1-1",
              name: "手术3",
            },
            {
              id: "1-2-1",
              pid: "1-2",
              name: "手术1",
            },
            {
              id: "1-2-2",
              pid: "1-2",
              name: "手术2",
            },
            {
              id: "1-2-3",
              pid: "1-2",
              name: "手术3",
            },
            {
              id: "1-3-1",
              pid: "1-3",
              name: "手术1",
            },
            {
              id: "1-3-2",
              pid: "1-3",
              name: "手术2",
            },
            {
              id: "1-3-3",
              pid: "1-3",
              name: "手术3",
            },
            {
              id: "2-1-1",
              pid: "2-1",
              name: "手术2-1-1",
            },
            {
              id: "2-1-2",
              pid: "2-1",
              name: "手术2-1-2",
            },
            {
              id: "2-1-3",
              pid: "2-1",
              name: "手术2-1-3",
            },
            {
              id: "2-2-1",
              pid: "2-2",
              name: "手术2-2-1",
            },
            {
              id: "2-2-2",
              pid: "2-2",
              name: "手术2-2-2",
            },
            {
              id: "2-2-3",
              pid: "2-2",
              name: "手术2-2-3",
            },
            {
              id: "2-3-1",
              pid: "2-3",
              name: "手术2-3-1",
            },
            {
              id: "2-3-2",
              pid: "2-3",
              name: "手术2-3-2",
            },
            {
              id: "2-3-3",
              pid: "2-3",
              name: "手术2-3-3",
            },
          ],
        },
      ],
      scheduleListData: [
        {
          id: "1",
          name: "01间",
          list: [
            {
              id: "1-1-1",
              name: "阿不都热依木（P1234567）",
              dockerId: "doctor-1-2",
              dockerName: "张三1-2",
            },
            {
              id: "1-1-2",
              name: "手术2",
              dockerId: "doctor-1-2",
              dockerName: "张三1-2",
            },
            {
              id: "1-1-3",
              name: "手术3",
              dockerId: "doctor-1-2",
              dockerName: "张三1-2",
            },
          ],
        },
        {
          id: "2",
          name: "02间",
          list: [
            {
              id: "1-1-1",
              name: "阿不都热依木（P1234567）",
              dockerId: "doctor-1-2",
              dockerName: "张三1-2",
            },
            {
              id: "1-1-2",
              name: "手术2",
              dockerId: "doctor-1-2",
              dockerName: "张三1-2",
            },
            {
              id: "1-1-3",
              name: "手术3",
              dockerId: "doctor-1-2",
              dockerName: "张三1-2",
            },
          ],
        },
      ],
      columns: [
        {
          dataIndex: "room",
          title: "手术间",
          width: 150,
          fixed: "left",
          align: "left",
        },
        {
          dataIndex: "tc",
          title: "台次",
          width: 120,
          fixed: "left",
          align: "left",
        },
        {
          dataIndex: "time",
          title: "时间",
          width: 120,
          fixed: "left",
          align: "left",
        },
        {
          dataIndex: "hospitalNo",
          title: "住院号",
          width: 120,
          fixed: "left",
          align: "left",
        },
        {
          dataIndex: "name",
          title: "姓名",
          width: 120,
          fixed: "left",
          align: "left",
        },
        {
          dataIndex: "age",
          title: "年龄",
          width: 120,
          fixed: "left",
          align: "left",
        },
        {
          dataIndex: "diagnosis",
          title: "诊断",
          width: 360,
          fixed: "left",
          align: "left",
        },
        {
          dataIndex: "surgeryPlanned",
          title: "拟施手术",
          fixed: "left",
          align: "left",
        },
        {
          dataIndex: "action",
          title: "操作",
          width: 120,
          fixed: "left",
          align: "left",
        },
      ],
    };
  },
  components: {
    SurgicalSchedule,
    // SurgicalScheduleList,
  },
};
</script>

<template>
  <div class="wrap">
    <!-- <a href="https://vitejs.dev" target="_blank"> -->
    <!--   <img src="/vite.svg" class="logo" alt="Vite logo" /> -->
    <!-- </a> -->
    <!-- <a href="https://vuejs.org/" target="_blank"> -->
    <!--   <img src="./assets/vue.svg" class="logo vue" alt="Vue logo" /> -->
    <!-- </a> -->
    <!-- <HelloWorld msg="Vite + Vue" /> -->
    <!-- <div style="height: 1000px"> -->
    <SurgicalSchedule :data="scheduleData" />
    <!-- </div> -->
    <!-- <div> -->
    <!--   <h2>列表</h2> -->
    <!--   <div style="width: 1200px"> -->
    <!--     <SurgicalScheduleList :columns="columns" :data="scheduleData" /> -->
    <!--   </div> -->
    <!-- </div> -->
  </div>
</template>

<style scoped>
.wrap {
  padding: 10px;
  height: 100%;
  /* height: 3000px; */
}
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
